/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.situ.studentmanagement.model;

/**
 *
 * @author niugao
 */
public class Student {
    public final static String TABLE_NAME = "student";
    //column names
    public final static String ID = "id";
    public final static String NAME="name";
    public final static String PASSWORD="password";
    public final static String PHONE="phone";
    public final static String EMAIL="email";
    public final static String SEX="sex";
    public final static String ADDRESS="address";
    public final static String CLASS_ID="class_id";

    private int id;
    private String name;
    private String password;
    private String phone;
    private String email;
    private boolean sex;
    private String address;
    private int class_id;
    private String class_name;
    private String headImg;//头像文件名
    private String sexChar ;
    public Student(Integer id,
                   String name,
                   String password,
                   String phone,
                   String email,
                   Boolean sex,
                   String address,
                   Integer class_id,
                   String headImg,
                   String class_name) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.email = email;
        this.sex = sex;
        this.address = address;
        this.class_id = class_id;
        this.class_name=class_name;
        this.headImg=headImg;
    }

    public Student(Integer id,
                   String name,
                   String password,
                   String phone,
                   String email,
                   Boolean sex,
                   String address,
                   Integer class_id,
                   String headImg) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.email = email;
        this.sex = sex;
        this.address = address;
        this.class_id = class_id;
        this.headImg=headImg;
    }
    public String getSexChar(){
        if(this.sex){
            return "女";
        }else {
            return "男";
        }
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public boolean getSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getClass_id() {
        return class_id;
    }

    public void setClass_id(int class_id) {
        this.class_id = class_id;
    }

    public String getClass_name() {
        return class_name;
    }

    public void setClass_name(String class_name) {
        this.class_name = class_name;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }
}
